﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _27_DDD.Models
{
    public class entity1Config : IEntityTypeConfiguration<entity1>
    {
        public void Configure(EntityTypeBuilder<entity1> builder)
        {
            builder.ToTable("T_Entity1");
            // HasConversion 把默认类型换成String类型
            builder.Property(p => p.monetaryUnit).HasConversion<String>().HasMaxLength(10);
        }
    }
}
